<template>
  <div class="app-container">
    <el-tabs v-model="activeName" type="card">
      <el-tab-pane label="棉花种植传统灌溉与智能节水系统用水量对比报告" name="first">
        <el-card style="width:800px;">
          <div class="box">
            <h2>一、棉花需水特性与试验背景</h2>
            <div class="content">
              <p><b>作物特性：</b><span>全生育期需水 350-500mm，敏感期为现蕾-吐絮期（占需水 90%）</span></p>
              <p><b>痛点问题：</b><span>漫灌导致亩耗水超 350m³，棉田次生盐渍化率>30%</span></p>
              <p><b>技术方案：</b><span>部署物联网智能滴灌系统（土壤墒情仪+气象站+智能灌溉设备）</span></p>
            </div>
          </div>
          <div class="box">
            <h2>二、对比试验方案</h2>
            <el-table border :data="tableData">
              <el-table-column prop="parameter" label="参数" width="180" />
              <el-table-column prop="traditionalIrrigation" label="传统漫灌组" />
              <el-table-column prop="smartIrrigation" label="智能灌溉组" />
            </el-table>
          </div>
          <div class="box">
            <h2>三、关键数据对比分析</h2>
            <el-table border :data="keyDataComparison">
              <el-table-column prop="growthStage" label="生育期" />
              <el-table-column prop="traditionalIrrigation" label="传统漫灌(m³/亩)" />
              <el-table-column prop="smartIrrigation" label="智能滴灌(m³/亩)" />
              <el-table-column prop="waterSavingEffect" label="节水效果" />
            </el-table>
          </div>
          <div class="box">
            <h2>四、综合效益分析</h2>
            <el-table border :data="comprehensiveBenefits">
              <el-table-column prop="indicator" label="指标" />
              <el-table-column prop="traditionalIrrigation" label="传统漫灌(m³/亩)" />
              <el-table-column prop="smartIrrigation" label="智能滴灌(m³/亩)" />
              <el-table-column prop="waterSavingEffect" label="节水效果" />
            </el-table>
          </div>
          <div class="box">
            <h2>五、结论与推广建议</h2>
            <div class="content">
              <h3>节水实证:</h3>
              <p>智能灌溉实现 <b>15.6%</b> 综合节水量（亩节水 <b>54.53m³</b>），水分生产率突破 <b>0.8kg/m³</b></p>
              <h3>增产机理:</h3>
              <p>花铃期保持土壤含水率 <b>65%-70%</b>，减少蕾铃脱落率 <b>7.3</b> 个百分点</p>
            </div>
          </div></el-card>
      </el-tab-pane>
      <el-tab-pane label="节水统计报告" name="second">
        <el-card style="width:800px;">
            <div class="box">
          <h2>传统漫灌统计</h2>
          <el-table border :data="traditionalIrrigationData">
            <el-table-column prop="seq" label="序号" width="80" />
            <el-table-column prop="irrigationTime" label="灌溉时间" width="150" />
            <el-table-column prop="perAcreIrrigation" label="亩灌溉量(m³)" width="150" />
            <el-table-column prop="totalIrrigation" label="总灌溉量(m³)" />
          </el-table></div>
          <h2>智能滴灌统计</h2>
          <el-table border :data="smartIrrigationData">
            <el-table-column prop="seq" label="序号" width="80" />
            <el-table-column prop="irrigationTime" label="灌溉时间" width="150" />
            <el-table-column prop="perAcreIrrigation" label="亩灌溉量(m³)" width="150" />
            <el-table-column prop="totalIrrigation" label="灌溉量(m³)" />
          </el-table>
          <h2>对比统计</h2>
          <el-table border :data="comparisonData">
            <el-table-column prop="indicator" label="指标" />
            <el-table-column prop="traditionalIrrigation" label="传统漫灌(m³/亩)" />
            <el-table-column prop="smartIrrigation" label="智能滴灌(m³/亩)" />
            <el-table-column prop="waterSavingEffect" label="节水效果" />
          </el-table>
        </el-card>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeName: 'first',
      tableData: [
        {
          parameter: '试验面积',
          traditionalIrrigation: '150 亩（对照田）',
          smartIrrigation: '150 亩（毗邻地块）'
        },
        {
          parameter: '灌溉方式',
          traditionalIrrigation: '渠水漫灌（7 次/季）',
          smartIrrigation: '膜下滴灌（16 次/季）'
        },
        {
          parameter: '数据周期',
          traditionalIrrigation: '2024 年 4 月-9 月（全生育期）',
          smartIrrigation: '2024 年 4 月-9 月（全生育期）'
        },
        {
          parameter: '监测维度',
          traditionalIrrigation: '用水量、土壤 EC 值、产量、灌溉用工量',
          smartIrrigation: '用水量、土壤 EC 值、产量、灌溉用工量'
        }
      ],
      keyDataComparison: [
        {
          growthStage: '苗期',
          traditionalIrrigation: '50',
          smartIrrigation: '25.04',
          waterSavingEffect: '减少深层渗漏'
        },
        {
          growthStage: '蕾期',
          traditionalIrrigation: '100',
          smartIrrigation: '65.22',
          waterSavingEffect: '关键节水期'
        },
        {
          growthStage: '花铃期',
          traditionalIrrigation: '150',
          smartIrrigation: '170.19',
          waterSavingEffect: '关键节水期'
        },
        {
          growthStage: '吐絮期',
          traditionalIrrigation: '50',
          smartIrrigation: '35.02',
          waterSavingEffect: '防早衰节水'
        }
      ],
      comprehensiveBenefits: [
        {
          indicator: '亩均节水',
          traditionalIrrigation: '350',
          smartIrrigation: '295.47',
          waterSavingEffect: '节水 15.6%'
        },
        {
          indicator: '产量',
          traditionalIrrigation: '342kg/亩',
          smartIrrigation: '398kg/亩',
          waterSavingEffect: '提升 16.4%'
        },
        {
          indicator: '灌溉用工',
          traditionalIrrigation: '5.2 工日/亩',
          smartIrrigation: '0.8 工日/亩',
          waterSavingEffect: '节省 84%'
        }
      ],
      traditionalIrrigationData: [
        { seq: 1, irrigationTime: '2024-04-05', perAcreIrrigation: 50, totalIrrigation: 7500 },
        { seq: 2, irrigationTime: '2024-04-31', perAcreIrrigation: 50, totalIrrigation: 7500 },
        { seq: 3, irrigationTime: '2024-05-15', perAcreIrrigation: 50, totalIrrigation: 7500 },
        { seq: 4, irrigationTime: '2024-06-01', perAcreIrrigation: 50, totalIrrigation: 7500 },
        { seq: 5, irrigationTime: '2024-06-15', perAcreIrrigation: 50, totalIrrigation: 7500 },
        { seq: 6, irrigationTime: '2024-07-15', perAcreIrrigation: 50, totalIrrigation: 7500 },
        { seq: 7, irrigationTime: '2024-08-15', perAcreIrrigation: 50, totalIrrigation: 7500 },
        { seq: '总计', irrigationTime: '', perAcreIrrigation: 350, totalIrrigation: 52500 }
      ],
      smartIrrigationData: [
        { seq: 1, irrigationTime: '2024-04-20', perAcreIrrigation: 15.02, totalIrrigation: 2254 },
        { seq: 2, irrigationTime: '2024-04-31', perAcreIrrigation: 10.02, totalIrrigation: 1504 },
        { seq: 3, irrigationTime: '2024-05-08', perAcreIrrigation: 15.06, totalIrrigation: 2259 },
        { seq: 4, irrigationTime: '2024-05-18', perAcreIrrigation: 10.08, totalIrrigation: 1512 },
        { seq: 5, irrigationTime: '2024-05-27', perAcreIrrigation: 15.02, totalIrrigation: 2253 },
        { seq: 6, irrigationTime: '2024-06-01', perAcreIrrigation: 25.06, totalIrrigation: 3759 },
        { seq: 7, irrigationTime: '2024-06-15', perAcreIrrigation: 20.08, totalIrrigation: 3012 },
        { seq: 8, irrigationTime: '2024-06-30', perAcreIrrigation: 24.99, totalIrrigation: 3748 },
        { seq: 9, irrigationTime: '2024-07-08', perAcreIrrigation: 25.08, totalIrrigation: 3762 },
        { seq: 10, irrigationTime: '2024-07-16', perAcreIrrigation: 25.03, totalIrrigation: 3754 },
        { seq: 11, irrigationTime: '2024-07-24', perAcreIrrigation: 25.01, totalIrrigation: 3752 },
        { seq: 12, irrigationTime: '2024-07-31', perAcreIrrigation: 25, totalIrrigation: 3750 },
        { seq: 13, irrigationTime: '2024-08-05', perAcreIrrigation: 25, totalIrrigation: 3750 },
        { seq: 14, irrigationTime: '2024-08-25', perAcreIrrigation: 15.01, totalIrrigation: 2252 },
        { seq: 15, irrigationTime: '2024-09-01', perAcreIrrigation: 10.02, totalIrrigation: 1503 },
        { seq: 16, irrigationTime: '2024-09-10', perAcreIrrigation: 9.99, totalIrrigation: 1499 },
        { seq: '总计', irrigationTime: '', perAcreIrrigation: 295.47, totalIrrigation: 44323 }
      ],
      comparisonData: [
        { indicator: '节水率', traditionalIrrigation: 0, smartIrrigation: '15.6%', waterSavingEffect: '提升15.6%' },
        { indicator: '灌溉均匀性', traditionalIrrigation: '70%', smartIrrigation: '90%', waterSavingEffect: '提升20%' }
      ]
    }
  },
  methods: {}
}
</script>
<style lang = "scss"  scoped>
h2{
    font-size:18px;
    font-weight:bold;
}
.box {
  margin-bottom: 20px;
}
.content {
  margin-top: 10px;
}
</style>
